<?
include('seguridad.php');
include('bd.php');
Conectar();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> BideYoday </TITLE>
  <META NAME="Generator" CONTENT="DILAPER">
  <META NAME="Author" CONTENT="Power by Sebastian Costa - Design: Nadia De Cinti">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
  <link href="../style.css" rel="stylesheet" type="text/css">
  <script src="../js/botonera.js" type="text/javascript"></script>
    <script language="JavaScript" type="text/JavaScript">

function validar_coment(form)
{
	if(form.name.value == '') {
		alert("Please insert Name");
		form.name.focus();
		return false;
	}
	if(form.modle.value == '') {
		alert("Please insert modle");
		form.modle.focus();
		return false;
	}
	if(form.price_d.value == '') {
		alert("Please insert price");
		form.price_d.focus();
		return false;
	}
		
	document.getElementById('product_edit').submit();
}
</script>
 </HEAD>

 <BODY topmargin="0">
<center>
<table width="990" height="100%" cellspacing="0" cellpadding="0" class="fondo" border="0">
	<tr>
		<td width="100%" height="100%" align="center" valign="top">
			<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
				<tr>
					<td align="center" valign="top">
<div style="height: 135px"></div>
<!-- contenido -->
<table width="800"  border="0" class="admin_area" cellspacing="0" cellpadding="0">
	<tr bgcolor="#ffffff">
		<td align="right" height="30">
Welcome <?echo $_SESSION['usuario'];?>&nbsp;|&nbsp;<a href="salir.php"><font color="red">Log Out</font></a>&nbsp;&nbsp;
		</td>
	</tr>	
	<tr><td height="3"></td></tr>
	<tr bgcolor="#ffffff">
		<td align="right" height="50">
<?include('menu.php');?>
		</td>
	</tr>	
	<tr><td height="3"></td></tr>
	<tr bgcolor="#ffffff">
		<td align="left" valign="top" height="300"  class="tabla_central">
<div style="margin: 10px">
<?
$result=mysql_query("SELECT * FROM products WHERE code='".$_GET[code]."'");
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
?>
<b><span class="titulo_admin">Products:&nbsp;&nbsp;<?echo$row[name]?></b>&nbsp;Modle:&nbsp;<b><?echo$row[modle]?></b>&nbsp;&nbsp;|&nbsp;&nbsp;code: <?echo$row[code]?></span></b><br>
<br>
To edit product<br>
<br>
<form name="product_edit" id="product_edit" method="POST" action="acciones/products_data_save.php" enctype="multipart/form-data">
<input type="hidden" name="id" value="<?echo$row[id];?>">
<input type="hidden" name="code" value="<?echo$row[code];?>">
<table width="100%" border="0" class="tabla_admin">
	<tr>
		<td align="right" bgcolor="#ffffff" valign="top">
<br>
<b>Measurement&nbsp;&nbsp;</b><br>
<br>
		</td>
		<td>
<br>
&nbsp;&nbsp;Text<br>
<textarea name="measurement" rows="10" cols="50"><?echo$row[measurement];?></textarea><br>
<br>
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff" valign="top">
<br>
<b>Comparison Chart&nbsp;&nbsp;</b><br>
<br>
		</td>
		<td>
<br>
&nbsp;&nbsp;Text<br>
<textarea name="comparison_chart" rows="10" cols="50"><?echo$row[comparison_chart];?></textarea><br>
<br>
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff" valign="top">
<br>
<b>Specification&nbsp;&nbsp;</b><br>
<br>
		</td>
		<td>
<br>
&nbsp;&nbsp;Text<br>
<textarea name="specification" rows="10" cols="50"><?echo$row[specification];?></textarea><br>
<br>
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff" valign="top">
<br>
<b>Control Panel&nbsp;&nbsp;</b><br>
<br>
		</td>
		<td>
<br>
&nbsp;&nbsp;Text<br>
<textarea name="control_panel" rows="10" cols="50"><?echo$row[control_panel];?></textarea><br>
<br>
		</td>
	</tr>
	<tr>
		<td align="right" bgcolor="#ffffff" valign="top">
<br>
<b>Size & Shape&nbsp;&nbsp;</b><br>
<br>
		</td>
		<td>
<br>
&nbsp;&nbsp;Text<br>
<textarea name="size_shape" rows="10" cols="50"><?echo$row[size_shape];?></textarea><br>
<br>
		</td>
	</tr>
	<tr>
		<td colspan="2" bgcolor="#ffffff" align="center">
<input type="submit" value="Save Data">
		</td>
	</tr>
</table>
</form>
<?}?>
</div>
<br>
		</td>
	</tr>
</table>
<table width="800" border="0" class="admin_area" cellspacing="0" cellpadding="0">
	<tr>
		<td height="3">

		</td>
	</tr>
	<tr bgcolor="#ffffff">
		<td align="right">
<?include('inc/foot.php');?>
		</td>
	</tr>
</table>
<!-- fin contenido -->
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</center>
 </BODY>
</HTML>
<?Desconectar();?>